import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hook_rent/pages/home/tab_index/index_navicgator_item.dart';
import 'package:hook_rent/widgets/image_widget.dart';
import 'package:hook_rent/widgets/swiper_widget.dart';

class IndexNavigator extends StatelessWidget {
  const IndexNavigator({super.key});

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: indexNavigatorItemList
          .map((item) => InkWell(
                onTap: () {
                  item.onTap(context);
                },
                child: Column(
                  children: [
                    ImageWidget(
                      item.imageUrl,
                      width: 45.w,
                    ),
                    Text(
                      item.title,
                      style: TextStyle(
                          fontSize: 14.sp, fontWeight: FontWeight.w500),
                    ),
                  ],
                ),
              ))
          .toList(),
    );
  }
}
